﻿<!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="viewport"
        content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <title>车生活</title>

  <!-- Set render engine for 360 browser -->
  <meta name="renderer" content="webkit">

  <!-- No Baidu Siteapp-->
  <meta http-equiv="Cache-Control" content="no-siteapp"/>

  <link rel="icon" type="image/png" href="assets/i/favicon.png">

  <!-- Add to homescreen for Chrome on Android -->
  <meta name="mobile-web-app-capable" content="yes">
  <link rel="icon" sizes="192x192" href="assets/i/app-icon72x72@2x.png">

  <!-- Add to homescreen for Safari on iOS -->
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-title" content="车生活"/>
  <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">

  <link rel="stylesheet" href="assets/css/amazeui.min.css">
  <link rel="stylesheet" href="assets/css/app.css">
</head>
<body>

<header data-am-widget="header" class="am-header am-header-default">
  <div class="am-header-left am-header-nav">
    <a href="javascript:history.go(-1)" class="">
      <i class="am-header-icon am-icon-chevron-left"></i>
    </a>
  </div>
  <h1 class="am-header-title">
    <a href="#title-link" class="">会员登录</a>
  </h1>
 <div class="am-header-right am-header-nav">
    <a href="javascript:;" id="nav_click" class="">
      <i class="am-menu-toggle-icon am-icon-th-large am-icon-sm"></i>
    </a>
  </div>
</header>

<div style="height:70px"></div>

<form action="" class="am-form" id="doc-vld-msg">
 <fieldset>
 	<div class="am-g">
 	<div class="am-u-sm-12">
    <div class="am-form-group">
      <input class="am-radius" type="text"  minlength="7" maxlength="11" data-validation-message="*输入错误，请仔细检查" placeholder="请输入手机号/车牌号/会员号" required/>
    </div>
  </div>

<div class="am-u-sm-12">
    <div class="am-g">
    <div class="am-u-sm-6">
      <div class="am-form-group">
        <input class="am-radius" type="tel"  minlength="11" maxlength="11" data-validation-message="*输入错误，请仔细检查" placeholder="请输入验证码" required/>
      </div>
    </div>
    <div class="am-u-sm-6">
      <input type="button" class="am-btn am-radius am-btn-primary am-btn-block  btn-sendsms" value="获取验证码" />
    </div>
   </div>
  </div>  
  
<div class="am-u-sm-12">    
    <div class="am-form-group">
      *登录即视为同意<a href="#" data-am-modal="{target: '#xieyi', closeViaDimmer: 0, width: 320, height: 225}">《用户协议》</a>
    </div>
</div> 
<div class="am-u-sm-12">
    <button class="am-btn am-btn-success am-radius am-btn-block" type="submit">登录</button>
    </div>
    </div>
 </fieldset>
</form>


<div class="am-modal am-modal-no-btn" tabindex="-1" id="xieyi">
  <div class="am-modal-dialog">
    <div class="am-modal-hd">92汽车《用户协议》
      <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
    </div>
    <div class="am-modal-bd">
      92汽车《用户协议》
    </div>
  </div>
</div>


<script type="text/x-handlebars-template" id="amz-tpl">
  {{>navbar navbar}}
</script>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/amazeui.min.js"></script>
<script src="assets/js/handlebars.min.js"></script>
<script src="assets/js/amazeui.widgets.helper.js"></script>
<script src="assets/js/app.js"></script>
<script src="http://cdn.staticfile.org/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script type="text/javascript">
  
   $(function(){
 
        /*仿刷新：检测是否存在cookie*/
        if($.cookie("captcha")){
            var count = $.cookie("captcha");
            var btn = $('.btn-sendsms');
            btn.val(count+'秒后可重新获取').attr('disabled',true).css('cursor','not-allowed');
            var resend = setInterval(function(){
                count--;
                if (count > 0){
                    btn.val(count+'秒后可重新获取').attr('disabled',true).css('cursor','not-allowed');
                    $.cookie("captcha", count, {path: '/', expires: (1/86400)*count});
                }else {
                    clearInterval(resend);
                    btn.val("获取验证码").removeClass('disabled').removeAttr('disabled style');
                }
            }, 1000);
        }
 
        /*点击改变按钮状态*/
        $('.btn-sendsms').click(function(){
            var btn = $(this);
            var count = 60;
            var resend = setInterval(function(){
                count--;
                if (count > 0){
                    btn.val(count+"秒后可重新获取");
                    $.cookie("captcha", count, {path: '/', expires: (1/86400)*count});
                }else {
                    clearInterval(resend);
                    btn.val("获取验证码").removeAttr('disabled style');
                }
            }, 1000);
            btn.attr('disabled',true).css('cursor','not-allowed');
        });
 
    });
// 表单验证
  $(function() {
  $('#doc-vld-msg').validator({
    onValid: function(validity) {
      $(validity.field).closest('.am-form-group').find('.am-alert').hide();
    },

    onInValid: function(validity) {
      var $field = $(validity.field);
      var $group = $field.closest('.am-form-group');
      var $alert = $group.find('.am-alert');
      // 使用自定义的提示信息 或 插件内置的提示信息
      var msg = $field.data('validationMessage') || this.getValidationMessage(validity);

      if (!$alert.length) {
        $alert = $('<div class="am-alert am-alert-danger"></div>').hide().
          appendTo($group);
      }

      $alert.html(msg).show();
    }
  });
});
</script>
</body>
</html>
